<?php
/**
 * 处理控制器
 */
namespace app\manage\controller\orderlogistics;

use app\manage\controller\Base;
use app\common\query\OrderLogistics;
use app\common\query\Plugin;

class Handle extends Base
{
	private $params;
    public function __construct(){
        parent::__construct();
        //token验证
        if(false == Base::checkToken()){
            $this->error('token error!');
        }
        //参数去token
        $params = input('post.');
        unset($params['token']);
        $this->params = $params;
    }

    /**
     * 物流货单删除
     * @return [type] [description]
     */
    public function del(){
    	$params = $this->params;
        $id = isset($params['id'])?intval($params['id']):0;
        if(!$id){
            $this->error('请选择删除对象');
        }
        $query = new OrderLogistics;
        if(false===$query->deleteOneData($id)){
            $this->error($query->getError());
        }else{
            $this->success('删除成功');
        }
    }

}